Report Editor - Create a New Sub-Detail Band
A sub-detail band is a special band that displays one dataset while being linked to another dataset (called the master). As each record is printed in the master dataset, Argos will execute the dataset in the sub-detail band (and print the sub-detail band once for each row returned). This allows you to loop through the sub-detail dataset for each record in the Master dataset.
Sub-detail bands typically use additional datasets in conjunction with the master. Creation of additional datasets is discussed on the Report Editor - Add Datasets page.
In nearly all cases, the master dataset is the main report query (ArgosData). The dataset displayed in a sub-detail band is a different one than the master dataset, in fact it can even be from a different database (as long as both datasets have some common field that can be used to link them). When building a dataset to use in a sub-detail band, it is important to define the join conditions from the new dataset to the master dataset (use the ABC icon to view fields in ArgosData or any other dataset). For example, if the master dataset included employee ID then your new dataset should include a line that links the ID in the new dataset to the ID in the master dataset.
The sub-detail band always prints after the detail band and it will loop through all records in its dataset before the master dataset is incremented to the next record. For this reason, this technique is significantly less efficient than other methods. You should use this technique when:
- You wish to loop through two or more datasets for each row in the detail band. For example, if your main report query included a list of employees, and for each employee you wanted to list their address(es) AND their previous employer(s). Generally, there is no need to use this technique if you only have one loop for each row in the detail band as you can simply include the additional data in your report query and use band groups (which is more efficient).
- You wish to loop through one or more datasets for each row in the detail band, but the data comes from different datasources. For example, if your main dataset was looping through employee records from one database, and you wished to list each employees' address(es) but that information came from a different database.
- Dataset - allows you to choose the dataset that is going to populate this sub-detail band. You can add datasets to a banded report by clicking the Show/Hide Datasets icon on the main band editor screen.
- Master - defines which is the master band for this sub-detail band.
- Font - changes the font characteristics of the text for fields added to the band.
- Color - changes the background color of the band. (Transparent - makes the background color 'see through' so background objects can be seen.)
- Only print if expression is true - allows you to set a condition, and only print this band if that condition is true.
- Print - allows you to set various print options for this band. They include:
- Before master-detailband
- At the bottom of page
- Print header/footer even if dataset is empty
- Force new page (before) - Checking this box will force a new page before the object is printed. This option will be ignored if the previous object printed was the page header band, the title band, a previous group header band, or the child of a previous group header band.
- Force new page (after) - Checking this box will force a new page after the object is printed. This option will be ignored if the object being printed falls on the last page of the report.
- Force new column
- Frame - allows you to put all or pieces of a frame around this band.
If you need additional help creating banded reports, refer to the Getting Started with Banded Reports page.
To read a step-by-step example on how to create sub-detail Bands, see Example 8 in the Argos Report Writer Guide.